let Vue;
const install = function(_Vue) {
  Vue = _Vue;
  Vue.mixin({
    beforeCreate() {
      //可以获取所有组件的实列
      let options = this.$options;
      if (options.store) {
        this.$store = options.store;
      } else {
        this.$store = this.$parent && this.$parent.$store;
      }
    },
  });
};
export { Vue, install };
